import { axios } from '@/utils/request'

// 发表评论
export function publishComment (data) {
  return axios({
    url: '/comment/publishComment',
    method: 'post',
    dataType: 'payload',
    data
  })
}

// 获取书籍所有评论
export function getBookCommentsList (data) {
  return axios({
    url: '/comment/getNovelCommentAll',
    method: 'post',
    dataType: 'payload',
    data
  })
}

// 删除评论
export function delCommentOne (data) {
  return axios({
    url: `/comment/delComment/${data.id}`,
    method: 'get'
  })   
}

// 是否点赞
export function isLike (data) {
  return axios({
    url: `/comment/commentSupport/${data.commentId}/${data.novelId}/${data.type}`,
    method: 'get'
  })   
}